const crumbs = new Vue({
    el: '#crumbs',
    data: function () {
        return {
            menuArray: [{
                label: '首页',
            }],
        }
    },
    methods: {
        goto({link}) {
            if (link) {
                forward(link)
            }
        },
    },
    async mounted() {
        const {accessPath,params} = rx.parseUrl(location.href)
        if (accessPath === '/') {
            return
        }
        let res = await sysMenuApi.getParentPath(`/${params.get('pagePath')}`);
        if (!res || (Array.isArray(res) && res.length === 0)) {
            res = [{
                label: '首页',
            }]
        }
        this.menuArray = res;
    }
})